<?php
/**
 * The template for displaying Category Archive pages.
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */

get_header(); ?>

<div class="main">
    <div class="main_left">
	  <!--main_left_box START-->
      <div class="main_left_box">
	    	<div class="main_left_box_main_h">
				<span>Currently viewing the category: "<b><?php the_category(); ?></b>"</span>
			</div>

        <?php if (have_posts()) : ?>
		<?php while (have_posts()) : the_post(); ?>

        <div class="main_left_box_01 bb">
        <?php thumb_img($post->post_content);?>
        <!--<img src="<?php bloginfo('template_directory'); ?>/images/u111_original.png" alt="" title="" />-->
          <dl>
            <dt>
              <h3><a href="<?php the_permalink() ?>"> <?php echo get_the_title(); ?></a></h3>
            </dt>
			<dd class="author">By <?php echo ucwords(get_the_author()); ?> On <?php the_time('F j, Y') ?> · <!--Add Comment--> <?php comments_popup_link( __( 'Add Comment', 'momo' ), __( '1 Comment', 'momo' ), __( '% Comments', 'momo' ) ); ?></dd>
            <dd><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 200,"......"); ?></dd>
			<dd class="more"><a href="<?php the_permalink() ?>">Read more »</a></dd>
          </dl>
        </div>
        <?php endwhile; ?>
        <?php endif;?>

		<!--分页 START-->
		<div class="tag_list_page">
        	<?php if(function_exists('wp_pagenavi')){ wp_pagenavi(); } else { ?>
            <div class="prev"><?php next_posts_link(__('« Previous Entries')) ?></div>
            <div class="next"><?php previous_posts_link(__('Next Entries »')) ?></div> <?php } ?>
          <!--<a class="prev">Prev</a><strong>1</strong><a href="/rip-dvd/2.html">2</a><a href="/rip-dvd/3.html">3</a><a href="/rip-dvd/4.html">4</a><a href="/rip-dvd/5.html">5</a><a href="/rip-dvd/6.html">6</a><a href="/rip-dvd/2.html" class="next">Next</a>-->
        </div>
		<!--分页 END-->
      </div>
	  <!--main_left_box END-->

    </div>

    <div class="main_right">
	<!--main_right_box START-->
      <div class="main_right_box">
        <div class="main_right_box_top">
          <div class="main_box_title1"></div>
          <div class="main_box_title2 short">
            <h2>Join TIR Now!</h2>
          </div>
          <div class="main_box_title3"></div>
        </div>
        <div class="main_right_box_nr">
          <div class="main_right_lb2">
            <ul>
              <li><a href=" https://www.facebook.com/transferiphonerecovery" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/facebook.jpg" alt="" title="" /></a></li>
              <li><a href="https://twitter.com/stevenjohn2013" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/twitter.jpg" alt="" title="" /></a> </li>
              <li><a href="https://plus.google.com/103615911574536298593" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/google+.png" alt="" title="" /></a> </li>
            </ul>
          </div>
        </div>
      </div>
	  <!--main_right_box END-->
	<!--Categories START-->
	<!--main_right_box START-->
      <div class="main_right_box">
        <div class="main_right_box_top">
          <div class="main_box_title1"></div>
          <div class="main_box_title2 short">
            <h2> <a href="">Categories</a> </h2>
          </div>
          <div class="main_box_title3"></div>
        </div>
        <div class="main_right_box_nr">
          <div class="main_right_lb3">
            <ul>
            <?php
			// 得到所有分类列表
			$categories = get_categories();
			// 循环所有分类
			foreach ($categories as $cat) {
			// 得到分类ID
			$catid = $cat->cat_ID;
			$cat_name = $cat->cat_name;

			// 得到分类下10篇最新文章
			query_posts("showposts=10");
			?>
			<li> <span class="mr_span">•</span> <a href="<?php echo get_category_link($catid);?>"><?php echo $cat_name;?></a> </li>
			<?php } ?>
			  <!--<li> <span class="mr_span">•</span> <a href="">App Resources</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Apple News</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Apple Software Tips</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Apple TV 3</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">iFunia Announcements</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">iPad Resources</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">iTunes</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Mac Tips</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Tech News</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Uncategorized</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">YouTube Tips</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Hot Movies & Music</a> </li>-->
            </ul>
          </div>
        </div>
      </div>
	  <!--main_right_box END-->
	  <!--Recent Posts START-->
	  <!--main_right_box START-->
      <div class="main_right_box">
        <div class="main_right_box_top">
          <div class="main_box_title1"></div>
          <div class="main_box_title2 short">
            <h2> <a href="">Recent Posts</a> </h2>
          </div>
          <div class="main_box_title3"></div>
        </div>
        <div class="main_right_box_nr">
          <div class="main_right_lb3">
            <ul>
            <!--输出10篇最新文章的标题及链接-->
                <?php while (have_posts()) : the_post(); ?>
                <li> <span class="mr_span">•</span> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
				<?php echo mb_strimwidth($post->post_title, 0,30 ,"..."); ?></a> </li>
                <?php endwhile; ?>
              <!--<li> <span class="mr_span">•</span> <a href="">Rip DVD on Mac</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Convert DVD to MKV</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Convert DVD to iPhone 4</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Convert DVD to WMV</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Convert DVD to iPad Mac</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Import DVD to Final Cut Pro</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Rip DVD to iTunes</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Mac DVD Ripper Review</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Import DVD to Final Cut Pro</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Convert MOV to AVI</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Convert WMV to MOV Mac</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Convert WMV to MOV Mac</a> </li>-->
            </ul>
          </div>
        </div>
      </div>
	  <!--main_right_box END-->
	  <!--main_right_box START-->
      <div class="main_right_box">
        <div class="main_right_box_top">
          <div class="main_box_title1"></div>
          <div class="main_box_title2 short">Hot Tags</div>
          <div class="main_box_title3"></div>
        </div>
        <div class="main_right_box_nr color" style="text-align:center;">
        	<?php if ( function_exists('wp_tag_cloud') ) : ?>
			<?php //wp_tag_cloud('unit=px&smallest=12&largest=30'); ?>
            <?php wp_tag_cloud('unit=px&smallest=12&largest=30'); ?>
            <?php endif; ?>

			<!--<a href="">1080p</a><a class="fs_18" href="">Apple TV</a><a href="">app</a>
			<a href="">Audio AVCHD AVI</a><a class="fs_18" href="">Christmas</a><a href="">Download</a>
			<a href="">YouTube Video</a><a class="fs_18" href="">DVD</a><a href="">CREATOR For Mac</a>
			<a href="">DVD Ripper For Mac</a><a class="fs_18" href="">DVD to ipad Converter</a><a href="">Father's Day Free Download</a>
			<a href="">youTube Video</a><a class="fs_18" href="">Holiday</a><a href="">Holiday Gift iMovies</a>
			<a href="">iPad</a><a class="fs_18" href="">ipad apps ipad mini ipad</a><a href="">video converter fot mac</a>-->
		</div>
      </div>
	  <!--main_right_box END-->
    </div>
	<!--main_right END-->
  </div>

				<?php
					//printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
				?>
				<?php
					/*$category_description = category_description();
					if ( ! empty( $category_description ) )
						echo '<div class="archive-meta">' . $category_description . '</div>';*/

				/* Run the loop for the category page to output the posts.
				 * If you want to overload this in a child theme then include a file
				 * called loop-category.php and that will be used instead.
				 */
				//get_template_part( 'loop', 'category' );
				?>

<?php //get_sidebar(); ?>
<?php get_footer(); ?>
